package org.cloud.apis.fallback;

import org.cloud.apis.AliPaymentFeign;
import org.cloud.model.dto.PayDto;
import org.cloud.response.ResponseCodeEnum;
import org.cloud.response.ResultData;
import org.springframework.stereotype.Component;

/**
 * ClassName: PayFeignSentinelApiFallBack
 * Package: org.cloud.apis.fallback
 * Description:
 *
 * @Author: @weixueshi
 * @Create: 2024/4/14 - 16:06
 * @Version: v1.0
 */
@Component
public class PayFeignSentinelApiFallBack implements AliPaymentFeign {
    @Override
    public ResultData addPayment(PayDto payDto) {
        return null;
    }

    @Override
    public ResultData queryOrder(String orderNo) {
        return null;
    }

    @Override
    public ResultData getPayByOrderNo(String orderNo)
    {
        return ResultData.fail(ResponseCodeEnum.BAD_REQUEST.getCode(),"对方服务宕机或不可用，FallBack服务降级o(╥﹏╥)o");
    }
}
